//
//  Common.swift
//  SwiftDemoWithSina
//
//  Created by qu on 2017/1/16.
//  Copyright © 2017年 Apple. All rights reserved.
//

import UIKit


let SWITCHROOTVIEWCONTROLLERNOTI = "SWITCHROOTVIEWCONTROLLERNOTI"
//表情按钮点击的通知
let EMOTIONBUTTONNOTI = "EMOTIONBUTTONNOTI"
//删除按钮点击的通知
let EMOTIONDELETEBUTTONNOTI = "EMOTIONDELETEBUTTONNOTI"

// 新浪微博需要的信息
let APPKEY = "3653141368"
let APPSECRET = "afa5c4d0bf8c2583626a57aff9db6f59"
let REDIRECT_URI = "http://www.baidu.com"
// 微博账号和密码
let HMWBNAME = "17744483590"
let HMWBPASSWD = "yuxuan3705"

//设置宽高
let KSCREENW = UIScreen.main.bounds.width
let KSCREENH = UIScreen.main.bounds.height
//背景颜色
let KCOlOR = UIColor.orange

// 常用字体大小(小 普通 大)normal
let QCSMALLFONTSIZE: CGFloat = 10
let QCNORMALFONTSIZE: CGFloat = 14
let QCLARGEFONTSIZE: CGFloat = 18

//颜色
func RGB(r: Float , g: Float , b: Float , alpha: Float = 1)->UIColor {
    
    return UIColor(colorLiteralRed: r/255, green: g/255, blue: b/255, alpha:alpha)
}
//随机色
func randomColor()->UIColor {
    
    let r =  Float(arc4random()%256)
    let g =  Float(arc4random()%256)
    let b =  Float(arc4random()%256)
    return RGB(r: r, g: g, b: b)
}
